#import "HorizonLuminaryController.h"
        
#import "HorizonLuminaryModel.h"
#import "HorizonLuminaryCell.h"
#import "Masonry.h"

@interface HorizonLuminaryController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *tranquilQuakeTableView;
@property (nonatomic, strong) NSMutableArray *jeopardyArr;

@end

@implementation HorizonLuminaryController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self diligentWandererCrispSetuplayout];
	[self pictureLaughZenithfetchData];
}


//: 获取数据模型
- (void)pictureLaughZenithfetchData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)jeopardyArr {
	if (!_jeopardyArr) {
		_jeopardyArr = [NSMutableArray array];
	}
	return _jeopardyArr;
}

//: 初始化页面UI
- (void)diligentWandererCrispSetuplayout {

	[self.view addSubview:self.tranquilQuakeTableView];
	[self.tranquilQuakeTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


- (UITableView *)figHandleTableView {
    if (!_tranquilQuakeTableView) {
        _tranquilQuakeTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _tranquilQuakeTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _tranquilQuakeTableView.estimatedRowHeight = 0;
        _tranquilQuakeTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _tranquilQuakeTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _tranquilQuakeTableView.delegate = self;
        _tranquilQuakeTableView.dataSource = self;
        _tranquilQuakeTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _tranquilQuakeTableView.showsVerticalScrollIndicator = NO;
        _tranquilQuakeTableView.showsHorizontalScrollIndicator = NO;
        _tranquilQuakeTableView.backgroundColor = UIColor.clearColor;
    }
    return _tranquilQuakeTableView;
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.jeopardyArr.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HorizonLuminaryCell *tranquilXenophobeRadiance = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([HorizonLuminaryCell class])];
    if (tranquilXenophobeRadiance == nil) {
        tranquilXenophobeRadiance = [[HorizonLuminaryCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([HorizonLuminaryCell class])];
    }
    tranquilXenophobeRadiance.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return tranquilXenophobeRadiance;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
